using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region SendMessage

	/// <summary>
	/// SendMessage object for NHibernate mapped table 'SendMessage'.
	/// </summary>
	public class SendMessage
	{
		#region Member Variables
		
		protected int _id;
		protected string _reciveWorker;
		protected string _reciveWorkerName;
		protected string _cCWorker;
		protected string _cCWorkerName;
		protected string _title;
		protected string _contents;
		protected string _fils;
		protected DateTime _addDate;
		protected int _isUser;
		protected string _userName;
		protected int _state;
		protected bool _isDel;
		protected bool _isPub;

		#endregion

		#region Constructors

		public SendMessage() { }

		public SendMessage( string reciveWorker, string reciveWorkerName, string cCWorker, string cCWorkerName, string title, string contents, string fils, DateTime addDate, int isUser, string userName, int state, bool isDel, bool isPub )
		{
			this._reciveWorker = reciveWorker;
			this._reciveWorkerName = reciveWorkerName;
			this._cCWorker = cCWorker;
			this._cCWorkerName = cCWorkerName;
			this._title = title;
			this._contents = contents;
			this._fils = fils;
			this._addDate = addDate;
			this._isUser = isUser;
			this._userName = userName;
			this._state = state;
			this._isDel = isDel;
			this._isPub = isPub;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual string ReciveWorker
		{
			get { return _reciveWorker; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for ReciveWorker", value, value.ToString());
				_reciveWorker = value;
			}
		}

		public  virtual string ReciveWorkerName
		{
			get { return _reciveWorkerName; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for ReciveWorkerName", value, value.ToString());
				_reciveWorkerName = value;
			}
		}

		public  virtual string CCWorker
		{
			get { return _cCWorker; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for CCWorker", value, value.ToString());
				_cCWorker = value;
			}
		}

		public  virtual string CCWorkerName
		{
			get { return _cCWorkerName; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for CCWorkerName", value, value.ToString());
				_cCWorkerName = value;
			}
		}

		public  virtual string Title
		{
			get { return _title; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for Title", value, value.ToString());
				_title = value;
			}
		}

		public  virtual string Contents
		{
			get { return _contents; }
			set
			{
				if ( value != null && value.Length > 4000)
					throw new ArgumentOutOfRangeException("Invalid value for Contents", value, value.ToString());
				_contents = value;
			}
		}

		public  virtual string Fils
		{
			get { return _fils; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for Fils", value, value.ToString());
				_fils = value;
			}
		}

		public  virtual DateTime AddDate
		{
			get { return _addDate; }
			set { _addDate = value; }
		}

		public  virtual int IsUser
		{
			get { return _isUser; }
			set { _isUser = value; }
		}

		public  virtual string UserName
		{
			get { return _userName; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for UserName", value, value.ToString());
				_userName = value;
			}
		}

		public  virtual int State
		{
			get { return _state; }
			set { _state = value; }
		}

		public  virtual bool IsDel
		{
			get { return _isDel; }
			set { _isDel = value; }
		}

		public  virtual bool IsPub
		{
			get { return _isPub; }
			set { _isPub = value; }
		}

		

		#endregion
	}
	#endregion
}